<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST"
    enctype="multipart/form-data">
    {:token()}
    <!-- 游戏名称 -->
    <div class="form-group">
        <label for="gamename" class="control-label col-xs-12 col-md-4 col-sm-2">{:__('Gamename')}:</label>
        <div class="col-xs-12 col-md-8 col-sm-8">
            <input id="gamename" class="form-control" name="row[gamename]" type="text" placeholder="请输入游戏名称">
        </div>
    </div>

    <!-- 游戏介绍 -->
    <div class="form-group">
        <label for="content" class="control-label col-xs-12 col-md-4 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-md-8 col-sm-8">
            <input id="content" class="form-control" name="row[content]" type="text" placeholder="请描述游戏">
        </div>
    </div>

    <!-- 下载次数 -->
    <div class="form-group">
        <label for="num" class="control-label col-xs-12 col-md-4 col-sm-2">{:__('Num')}:</label>
        <div class="col-xs-12 col-md-8 col-sm-8">
            <input id="num" class="form-control" name="row[num]" type="text" placeholder="下载次数">
        </div>
    </div>

    <!-- 适配 -->
    <div class="form-group">
        <label for="adapt" class="control-label col-xs-12 col-md-4 col-sm-2">{:__('Adapt')}:</label>
        <div class="col-xs-12 col-md-8 col-sm-8">
            <input id="adapt" class="form-control" name="row[adapt]" type="text" placeholder="适配系统">
        </div>
    </div>
    
     <!-- 文件上传 (支持ZIP等压缩包) -->
    <div class="form-group">
        <label for="address" class="control-label col-xs-12 col-sm-2">{:__('File')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="address" class="form-control" size="50" name="row[address]" type="text" readonly/>

                <div class="input-group-addon no-border no-padding">
                    <span>
                        <button type="button" id="faupload-address" class="btn btn-danger faupload"
                            data-input-id="address"
                            data-mimetype="application/zip,application/x-zip,application/x-zip-compressed,application/octet-stream,application/x-rar,application/x-7z-compressed"
                            data-multiple="false" data-preview-id="p-address" data-savepath="/game/">
                            <i class="fa fa-upload"></i>
                            上传文件
                        </button>
                    </span>
                    <span>
                        <button type="button" id="fachoose-address" class="btn btn-primary fachoose"
                            data-input-id="address"
                            data-mimetype="application/zip,application/x-zip,application/x-zip-compressed,application/x-rar,application/x-7z-compressed"
                            data-multiple="false">
                            <i class="fa fa-list"></i>
                            选择文件
                        </button>
                    </span>
                </div>
                <span class="msg-box n-right" for="address"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-address"></ul>
        </div>
    </div>


    <!-- 游戏图标 -->
    <div class="form-group">
        <label for="avatar" class="control-label col-xs-12 col-sm-2">{:__('Avatar')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <!-- 上传路径 -->
                <input id="avatar" class="form-control" size="50" name="row[avatar]" type="text" readonly/>

                <div class="input-group-addon no-border no-padding">
                    <span>
                        <button type="button" id="faupload-avatar" class="btn btn-danger faupload"
                            data-input-id="avatar" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp"
                            data-multiple="false" data-preview-id="p-avatar">
                            <i class="fa fa-upload"></i>
                            上传
                        </button>
                    </span>
                    <span>
                        <button type="button" id="fachoose-avatar" class="btn btn-primary fachoose"
                            data-input-id="avatar" data-mimetype="image/*" data-multiple="false">
                            <i class="fa fa-list"></i>
                            选择
                        </button>
                    </span>
                </div>
                <span class="msg-box n-right" for="avatar"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-avatar"></ul>
        </div>
    </div>

   <!-- 详情图片 -->
    <div class="form-group">
        <label for="thumbs" class="control-label col-xs-12 col-sm-2">{:__('Thumbs')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <!-- 上传路径 -->
                <input id="thumbs" class="form-control" size="50" name="row[thumbs]" type="text" readonly/>

                <div class="input-group-addon no-border no-padding">
                    <span>
                        <!-- 修改按钮ID和预览ID -->
                        <button type="button" id="faupload-thumbs" class="btn btn-danger faupload"
                            data-input-id="thumbs" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp"
                            data-multiple="true" data-preview-id="p-thumbs">
                            <i class="fa fa-upload"></i>
                            上传
                        </button>
                    </span>
                    <span>
                        <!-- 修改按钮ID -->
                        <button type="button" id="fachoose-thumbs" class="btn btn-primary fachoose"
                            data-input-id="thumbs" data-mimetype="image/*" data-multiple="true">
                            <i class="fa fa-list"></i>
                            选择
                        </button>
                    </span>
                </div>
                <span class="msg-box n-right" for="thumbs"></span>
            </div>
            <!-- 使用独立的预览容器ID -->
            <ul class="row list-inline faupload-preview" id="p-thumbs"></ul>
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="button" class="btn btn-default btn-embossed btn-close">{:__('Close')}</button>
        </div>
    </div>
</form>
